package org.example.api.Blog;

import org.example.entity.domain.Blog;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author Aaron
 * @since 2020/12/25 16:15
 * <p>描述：</p>
 */
@Primary
@FeignClient(name = "microservice-example-ms", fallbackFactory = FeignBlogServiceImpl.class)
public interface FeignBlogService {

    @RequestMapping(value = "/{id}", method = RequestMethod.GET)
    Blog findById(@PathVariable("id") Long id);

}
